home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
151-175
/
scopedisk168
/
serial
/
serial.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
2KB
|
46 lines
SERIAL.C - Released date: 21-SEP-1990
By: Ned Kelly
Arlington, Texas
817-277-5825
This program is designed to monitor three status lines (DTR, CTS, CD)
on a serial port. In the event that any status line has changed, an
event is sent to an ARexx task which will decide what to do with the
event.
Calling sequence is:
SERIAL p U u [D d] [Q l u v] [L n]
where 'p' is the name of the ARexx program to be invoked.
where 'u' is a unit number of a serial port to watch. This
must be a number between '0' and '8'.
A unit must be sepcified. There is no default.
Multiple units may be specified in a single call.
ie. SERIAL PROGRAM U 3 U 5 U 7
where 'd' is a delay in units of 1/50 second to wait between
checks of the serial port(s).
Default is 50 (ie. one second).
The program will terminate under one of two conditions.
If neither the 'Q' nor the 'L' option are specified,
the program will do it's thing once and then terminate.
If the 'Q' option is specified, then the program will
terminate when line 'l' (which may be either 'CD', 'CTS',
or 'DSR') on unit 'u' (which may be a number from '0'
through '8') becomes value 'v' (which may be either
'0' or '1').
If the 'L' option is specified, then the program will
loop through 'n' times and then quit.
When a status line has changed, program will issue the command:
rx p SERIAL [l u v]
where 'l' is the name of a status line which will be either
CD, CTS, or DSR
where 'u' is the unit number of the serial port which will
be a number from '0' through '8'.
where 'v' will be either a '0' or a '1'.
'v' will be '0' if the status line is open
(not grounded).
'v' will be '1' if the status line is closed
(grounded).